The term “Web application” or “Web app” is often used to describe a new type of software application that is commonly deployed as multiple Web pages accessible over the Internet. A conventional Web app includes multiple Web pages representing markup-based documents. The Web app may also include scripts or other resources that are accessed through the Web pages. Commonly, the Web app is stored on a Web server and downloaded to a local computer when being used. Currently, it is not actually possible to download and install a typical Web app for subsequent use when the computer is offline.
For most Web apps, the multiple Web pages and resources are hyperlinked together in such a way that the “business logic” of the Web app is distributed over the multiple resources. Each page is responsible for a portion of the overall business logic, and by navigating from page to page, the user can experience the entire Web app. For the purpose of this document, the term “navigating” refers to causing a hosting environment to retrieve a resource associated with the Web app, such as by activating a hyperlink. Navigating to a resource typically involves navigating away from another resource where the navigated-to resource is the one being retrieved by the hosting environment.
Current technological limitations make conventional Web apps less than optimum. For instance, there is no communication between the Web pages or resources. With the conventional Web app, state information can only be persisted when navigating from one Web page to another by using “cookies” or a server-side session object, neither of which is particularly satisfying.
If a server-side session object or server-side cookie is used, the session state lives on the server. For that reason, a round-trip to the server is required if a Web page that is loading on a client machine needs access to the session state. Not only is this not optimal for performance, it precludes using these Web apps when offline.
Client-side cookies may also be used to share state between navigations. However, there are a number of problems with this approach as well. For instance, cookies are text based, which greatly limits their effectiveness. Cookies cannot be used to store objects as objects. Rather, an object must be persisted and de-persisted as text if a cookie is used. This poses a particular problem because current architectures limit the size of cookies to 4 kb per cookie. In addition, there is a maximum of 20 cookies per Web-page. So the amount and kind of information that can be stored in a cookie is severely limited. Further still, users frequently disable local cookies, which renders cookie-based applications ineffective.
A superior mechanism for persisting state between navigations in a navigation-based application, such as a Web app, has eluded those skilled in the art.